﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<link rel="stylesheet" type="text/css" media="screen" href="css/jquery-ui-1.8.1.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />
<script src="js/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-cn.js" type="text/javascript"></script>
<script src="js/json2.js" type="text/javascript"></script>
<script type="text/javascript">
	$.jgrid.no_legacy_api = true;
	$.jgrid.useJSON = true;
</script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script type="text/javascript">
function toExcel() {
	$("#df").attr("src","main?action=15&oper=excel");
};

function setGrid() {
	jQuery("#list1").jqGrid({ 
			url:'main?action=15',
			hidegrid: "false",
			datatype: "json",
			colNames:['行政区','三无老人','三无老人发放资金','70岁低保','70岁低保发放资金','85高龄','85高龄人员发放资金','70岁优抚','70岁优抚发放资金','70岁劳模','70岁劳模发放资金','合计人数','合计需要发放资金'], 
			colModel:[ 
					{name:'district',width:60, sortable:false, formatter:'select', editoptions:{value:"0:总计;1:市辖区;2:桥东区;3:桥西区;4:高新区;5:宣化区;6:下花园区"}},
					{name:'sanwu',width:60, sortable:false, align:'right'},
					{name:'sanwu1',width:100, sortable:false, align:'right'},
					{name:'dibao',width:60, sortable:false, align:'right'},
					{name:'dibao1',width:100, sortable:false, align:'right'},
					{name:'gaoling',width:60, sortable:false, align:'right'},
					{name:'gaoling1',width:100, sortable:false, align:'right'},
					{name:'youfu',width:60, sortable:false, align:'right'},
					{name:'youfu1',width:100, sortable:false, align:'right'},
					{name:'laomo',width:60, sortable:false, align:'right'},
					{name:'laomo1',width:100, sortable:false, align:'right'},
					{name:'totalNum',width:60, sortable:false, align:'right'},
					{name:'totalMoney',width:120, sortable:false, align:'right'}
			],
			rowNum:7,
			height: 165,
			editurl:'main?action=15',
			caption:"三无/低保人员人数及需要发放资金统计信息"
	})}; 
	
	$(document).ready(function(){
		setGrid();
		$("#sf_excel").click(toExcel);
		$("#adddata").click(function(){
			jQuery("#list1").jqGrid('delGridRow', "0", {
			  				caption:"确定要下拨资金吗？", 
			  				msg:"将要下拨给各区的资金列于上表中",
			  				bSubmit:"确定",
			  				delicon: [true,'left','ui-icon-play'],
			  				top: 200,
				  			left: 400,
			  				modal: true,
			  				closeAfterEdit:true,
			  				afterSubmit : function(r, postdata) {
			  					var data = eval('(' + r.responseText + ')');
			  					switch (data.code) {
			  						case 0: return [true, data.message];
			  						case 1000: return [false, "本月度资金下拨正在进行中，请在下拨信息中查看！"];
			  						case 20000: return [false, "操作失败，该月度资金已经下拨，请勿重复！"];
			  						default: return [false, data.message];
			  					}
			  				}
			});
		});
	});
</script>

<body style="background-color:#4e84c0;">
				<iframe id="df"  name="df" src="" width=0 height=0 frameborder="0" ></iframe>
				<input type="button" id="sf_excel" value="导 出">
				<div id="RightPane"  >
					<div class="innertube">
					<table id="list1"></table>
					<p>
					<!-- input type="button" id="adddata" value="下拨资金" /-->
				</div>
				</div>
</body>
